Skip to content

Avoid creation of unnecessary collections #14916

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

dreis2211
Copy link
Contributor

@dreis2211 dreis2211 commented Oct 21, 2018

Hi,

this PR replaces occurences of new HashSet<>(Arrays.asList(element)) with Collections.singleton(element) where applicable. (E.g. where we don't change the collection afterwards or where we simply iterate over the collection).

Let me know what you think.
Cheers,
Christoph

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 21, 2018
@philwebb philwebb added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Oct 21, 2018
@philwebb philwebb added this to the 2.1.x milestone Oct 21, 2018
@philwebb
Copy link
Member

Nice! Thanks again @dreis2211

@mbhave mbhave modified the milestones: 2.1.x, 2.0.7 Oct 22, 2018
mbhave added a commit that referenced this pull request Oct 22, 2018
* gh-14916:
  Avoid creation of unnecessary collections
@mbhave mbhave closed this in 5c0d7f4 Oct 22, 2018
@mbhave
Copy link
Contributor

mbhave commented Oct 22, 2018

Thanks @dreis2211. This is now on master.

@wilkinsona wilkinsona added type: task A general task and removed type: enhancement A general enhancement labels Nov 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants